var doc = app.activeDocument;
var artboards = doc.artboards;

renameArtboards()

function renameArtboards(prefix) {
    for (var i = 0; i < artboards.length; i++) {
        var rect = artboards[i].artboardRect
        var size = getArtboardSize(rect)
        artboards[i].name = getFilename() + '-' + ~~size.width + 'x' + ~~size.height + 'px'
    }
}

function getFilename() {
	return doc.name.split('.')[0];
}

function getArtboardSize(rectObj) {
    var rect = rectObj.toString().split(',')
    var x1 = +rect[0]
    var y1 = +rect[1]
    var x2 = +rect[2]
    var y2 = +rect[3]
    var rectangle = {
        y: y1,
        x: x1,
        width: Math.abs(x2 - x1),
        height: Math.abs(y2 - y1)
    }
    return rectangle
}